package com.ww.learn.generic

open class Animal(val name: String) {
    open fun makeSound() = "Some animal sound"
}

open class Dog(name: String): Animal(name) {
    override fun makeSound() = "Woof!"
    fun fetch() = "Fetching stick"
}

class Cat(name: String): Animal(name) {
    override fun makeSound() = "Meow!"
    fun scratch() = "Scratch!"
}

class Puppy(name: String): Dog(name) {
    override fun makeSound() = "Tiny woof!"
}